let http = uni.$u.http

//注册
export const register = (params, config = {}) => http.post('user/register', params, config)
//密码登录
export const login = (params, config = {}) => http.post('user/login', params, config)
//手机验证码登录
export const codeLogin = (params, config = {}) => http.post('user/mobilelogin', params, config)
//创建订单
export const createOrder = (params, config = {}) => http.post('order/addOrder', params, config)
//确认报价(报价订单)
export const confirmPrice = (params, config = {}) => http.post('order/orderOffer', params, config)
//订单付款
export const orderPay = (params, config = {}) => http.post('pay/payment', params, config)
//订单管理页
export const orderManage = (params, config = {}) => http.post('order/index', params, config)
//订单列表
export const orderList = (a,b) => http.get(`order/orderlist?state=${a}&keywords=${b}`)
//订单详情 
export const orderDetail = (a) => http.get(`order/getOrderInfo?id=${a}`)
//物品类目
export const category = (params, config = {}) => http.post('index/category', params, config)
//获取优惠券
export const coupon = (a,b) => http.get(`coupon/query?order_type=${a}&price=${b}`)
//报价列表
export const baojiaList = (params, config = {}) => http.post('order/offerlist', params, config)
//去雇佣
export const toHire = (params, config = {}) => http.post('order/checkworker', params, config)
//竣工图片
export const overImg = (params, config = {}) => http.post('order/completedimg', params, config)
//确认验收
export const confirmOrder = (params, config = {}) => http.post('order/checkorder', params, config)
//订单评价
export const assessOrder = (params, config = {}) => http.post('order/commentOrder', params, config)
//取消订单
export const cancelOrder = (params, config = {}) => http.post('order/cancelOrder', params, config)
//继续加价
export const addPrice = (params, config = {}) => http.post('pay/raiseprice', params, config)
//个人信息
export const userInfo = (params, config = {}) => http.post('user/userinfo', params, config)
//账户明细
export const accountDetail = (params, config = {}) => http.post('user/moneylist', params, config)
//我的优惠券
export const myCoupon = (params, config = {}) => http.post('coupon/getMyList', params, config)
//修改个人信息
export const resetInfo = (params, config = {}) => http.post('user/profile', params, config)
//更换手机号
export const resetPhone = (params, config = {}) => http.post('user/changemobile', params, config)
//初始化提现页面
export const cashOut = (params, config = {}) => http.post('pay/initialWithdraw', params, config)
//充值密码
export const resetPwd = (params, config = {}) => http.post('user/resetpwd', params, config)
//协议
export const xieYi = (params, config = {}) => http.post('index/xieyi', params, config)
//客服
export const keFu = (params, config = {}) => http.post('index/kefu', params, config)